/**
 * TO BE DETERMINED 
 */
package org.eichar.client;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.StackPanel;
import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * Factory interface for creating widgets such as buttons, panels, etc...
 * <p>
 * This is to prevent the use of new Button() so that testing is easier
 * </p>
 * 
 * @author Jesse
 */
public interface WidgetFactory {

    /**
     * Creates a new {@link VerticalPanel}
     * 
     * @return a new {@link VerticalPanel}
     */
    VerticalPanel createVerticalPanel();

    /**
     * Creates a new {@link HorizontalPanel}
     * 
     * @return a new {@link HorizontalPanel}
     */
    HorizontalPanel createHorizontalPanel();

    /**
     * Creates a new {@link TabPanel}
     * 
     * @return a new {@link TabPanel}
     */
    TabPanel createTabPanel();

    /**
     * Creates a new {@link StackPanel}
     * 
     * @return a new {@link StackPanel}
     */
    StackPanel createStackPanel();

    /**
     * Creates a new {@link Label}
     * 
     * @param text
     *            the label's text
     * @return a new {@link Label}
     */
    Label createLabel(String text);

    /**
     * Creates a new {@link Label}.
     * 
     * @param text
     *            the label's text
     * @param wrapLabel
     *            if true then the label's text can be wrapped.
     * @return a new {@link Label}.
     */
    Label createLabel(String text, boolean wrapLabel);

    /**
     * Creates a new {@link Button}
     * 
     * @param text
     *            the button's text
     * @return a new {@link Button}
     */
    Button createButton(String text);

    /**
     * Creates a new {@link TextBox}
     * 
     * @return new {@link TextBox}
     */
    TextBox createTextBox();

    /**
     * Creates a new {@link HTML}
     * 
     * @param html
     *            the html string
     * @return Creates a new {@link HTML}
     */
    HTML createHTML(String html);

}
